package com.gougang.interview;

/**
 * Created by 16978 on 2017/4/6.
 */
public enum CardType {
    Hearts,
    Spade,
    Club,
    Diamond;


    public static CardType getType(int no) {
        for (CardType type : CardType.values()) {
            if (type.ordinal() == no) {
                return type;
            }
        }
        return null;
    }
}
